package com.sxmmall.ware.dao;

import com.sxmmall.ware.entity.WareSkuEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 商品库存
 * 
 * @author sxm
 * @email 1125400943@qq.com
 * @date 2021-07-07 14:44:48
 */
@Mapper
public interface WareSkuDao extends BaseMapper<WareSkuEntity> {

    /*
     * @Author sxm
     * @Description 采购单入库-库存 包含该sku 修改
     * @Date 13:28 2021/9/23
     * @Param [skuId, wareId, skuNum]
     * @return [java.lang.Long, java.lang.Long, java.lang.Integer]
     **/
    void addStock(@Param("skuId") Long skuId, @Param("wareId") Long wareId, @Param("skuNum") Integer skuNum);

    /*
     * @Author sxm
     * @Description 获取sku对应的总库存
     * @Date 15:50 2021/10/8
     * @Param [skuId]
     * @return [java.lang.Long]
     **/
    Long getSkuHasStock(@Param("skuId") Long skuId);
}
